The hard X-ray spectrum of X Persei