Use posix_spawn instead of fork/exec to prevent crash on MacOS Maverick