Fix mining script to cope with bug in getwork pool