closes #1953 only needed for freestanding targets. also adds safety for `@intToPtr` when the address is zero.