Make sure PlatformDependent.maxDirectMemory() works on Android

- Fixes #1451