Fix incorrect Mat address reconstruction on 64-bit platforms

This fixes random failures in Java wrappers.
Merge pull request #300 from taka-no-me:java_64bit