Compatibility with gfortran

Removed #elifs, and replace them by #ifdefs