Fix parallel builds and libnative reads from stdin

All the fun is down below.