Fixed tolua linking order.

Ref.: #1044.