PSD: code changes for when my oiio/psd patch gets merged upstream