building plugin on Android

No code changes needed, but subtle changes to makefiles were required, ordering of these changes was important.  My travis build passed so sending in this pull request.  I did not update travis.yml for the plugin build.