Hearts have signed striker Paul McCallum from Premier League club West Ham until the end of the season.