Pass -D SDL when SDL is used

Update the Qt build to use the same define
so that common files can use it.
Detect azerty and qwertz

Addresses #2462.
Merge pull request #5264 from g2p/basic-layout-detection

Basic layout detection