Updated to support linking Tk dynamically