A platform-independent wrapper around spawn