Ran into another error while trying to compile nginx from source
./configure: error: the HTTP image filter module requires the GD library. You can either do not enable the module or install the libraries.
This has a quick fix as well, issue the following at shell:
yum install gd gd-devel
That should be it.