languages: cmake: lazily load statemap

(integrated from trunk branch change 2ff8fcb by Todd Whiteman <toddw@activestate.com>)