Former Hearts midfielder Jamie Hamill has returned to the Scottish Premiership to rejoin his first club Kilmarnock.