[fix #4140] JModelLegacy::addIncludePath is supposed to support arrays

This PR is for issue #4140