Add a fallback if log2() is not available