Replace more ROTATE macros with C code.
Fix build and fix build with OPENSSL_NO_ASM define.