Add JRuby to travis. Minor spec fixes for JRuby compatibility.