Add crypto >= 0.9.0 support

Adds compatibility for crypto >= 0.9.0, which defaults return types to Buffer instead of binary.