Used find/replace query

    find:       ((\t*)var p = ((\w+)\.prototype)[^\n]*)
    replace: $1\n$2$3.constructor = $4;

In all files to fix #474