Observation of gamma-ray emission from the galaxy M87 above 250 GeV with VERITAS