JRuby 1.9 doesn't require posix/spawn

Since JRuby 1.9 doesn't require posix/spawn, only follow that path if JRuby is loaded and running in 1.8 mode.

This is very close to the solution proposed by @danielfarrell in [#290](https://github.com/ddollar/foreman/pull/290), but follows the original spirit a little more closely.

I can also confirm that both solutions work for me, running foreman in JRuby 1.7 on Java 7.