ENH: Restore compatibility with wxPython 2.8

The recent switch from using wxPython's Notebook widget to FlatNotebook
for code dialog broke the compatibility with wxPython 2.8 because style
FNB_NAV_BUTTONS_WHEN_NEEDED is not available there. This prevented code
dialog from showing because an AttributeError was raised. The attribute
is not needed to make code dialog work so this was fixed by checking if
it is available and only using it if this is the case (newer wxPython).