change merging array method for compatibility with php 5.4