Fixes for g++ 4.7.2 to determine type of function being based to library foreachchild function