Avoidance of future singularities in loop quantum cosmology