Ruby >2.0 fixes, move PBKDF into lib