Jruby support

Adds jruby support for OSX and Linux. The `Serial` object is no longer a ruby IO object.