Fix failures when using pycrypto. Closes #3