Fix failing tests on numpy 1.7