The costs of 51% attacks on Proof of Work cryptocurrencies