Hard code 4096 return value for JRuby because of bug in jruby-ffi.