BUGFIX: when linking .img, .hdr should be linked too (and vice-versa)