Fix build failure on systems without POSIX spawn
This fixes build failure on old systems that don't have POSIX spawn.
The problem was introduced in 61f54591 so the build failure was new in glib 2.57.2 and hopefully the fix can be backported to 2.58.x.