Incorporating nanomaterials in thin film composite membranes