Swap defined(sun) for defined(__sun) which is apparently defined in more cases