Add Map.from_struct/1

Issue #2540