Foreign fund buying lifts KLCI, with Maxis up in late trade