Allow extension of JS modules in addition to JSON objects.

This is useful (to me) for building a layered configuration incorporating
both primitives and functions.