Fix the build for jruby --1.8

TL;DR Encoding doesn't exist on 1.8, go figure. So we
catch the actual exception that it throws. Fun.
add jruby? to test helper

Writing all that all the time is annoying as hell.