Improved compatibility by removing intrinsic log2.