Hydrogen sorption in polymers for membrane applications