Knicks lock up Tom Thibodeau with contract extension