US department store chain JC Penney has reported better than expected first quarter profit and shown further improvement in its gross margins.