Issue 2 ruby19 compatibility

Please consider to pull my changes. I've spent 3 hours, but I've reproduced the issue I've face during using attr_encrypted on my Rails3 + Ruby1.9 project. ;]

Thanks in advance!