Polymer membranes for hydrocarbon separation and removal