Modification of gas separation membranes on a nanometric scale