Fix linking for bash <= 4.2

Linking didn't work in bash versions 4.2 and earlier since
support for global associative arrays declared inside functions
weren't introduced until 4.3, so as workaround just declare it outside
a function.