fix reduce method is not available in ie8