changes to compile with older LLVM 3.1
add inverse hyperbolic functions back, use the external C ones instead of intrinsics to be compatible with older llvm