Necessary patches to get ATLAS building on OSX.

Compilation tested on OSX and Linux. Note that you need to `make -C deps compile-atlas` and also `make -C deps install-atlas`.

I pass all tests on OSX, but linux is throwing intermittent errors.  I have been testing with `USE_BLAS_64=0`, is that correct for ATLAS?  I can't seem to find much documentation about using ATLAS with Julia.