Fix PendingDeprecationWarning raised by Python 3.4.1

Resolves #104. Tested with Python 3.4.1 and 2.7.7.