What about adding IMGDLL_LIBRARY to the project defines?