Remove use of elf edit and instead directly create a shared library for android.

For reasons I cannot determine, the old method crashes deep inside
dlopen(), however directly creating a shared library works.