Fixed code depending on 'constructor.name' so the

behavior is normalized on IE