Compile with JDK 1.6

Reverts some of f6c52ddb7575d4324da296976d2d8f9535228b94

It looks like conversions using Long/Int objects should work. Please confirm on your end if so and submit another PR for the fix