Only link to libcharls if it exists.