Add support to cross-compile for Mac from linux

The RANLIB variable is required because zlib doesn't find the correct ranlib binary when cross-compiling for Mac