The pulsed hard X-ray spectrum of PSR B1509-58