Fixing fork on JRuby
Restricted compatibility only to MRI.