Use cross-spawn

Fixes #588.