Rogue planets can form without a parent star