Fix incorrect Log statement.
Fix incorrect function name in Solaris 9 code.
Don't rely on _INT64_TYPE define, it is not available everywhere.

unint64_t should be pretty safe to assume is available.
Implement log2() which is missing on Solaris 9.