Measuring the galactic cosmic ray flux with the LISA Pathfinder radiation monitor