Fix makefile to work with NERSC compilers etc.