Get the PID properly on Android

- Related: #2109