Adjust build to account for new library names in OpenEXR 2.1.

Also had to fix a friend declaration (use the whole class name, with its namespaces, else it did not worked here [gcc4.8]).