Fixed a few issues in the nginx build script