Measuring air showers with the LOFAR radio telescope