Enhanced sensitivity to variation of fundamental constants in the transitions of 229Th and 249Bk