Fix compilation and linking under Linux.

Although the control is not yet created correctly these changes do allow clean compilation and linking.