Portable class library compatibility logic