Fix msgpack long value in java serializer

msgpack serializer in the java code breaks if the serialized value is represented as java long instead of java int. We can't distinguish between long and int in msgpack, so using always getLong() is the safest solution. This does not have any effect in python, but protects from java failures.