Revert "Revert "Add workaround for SW keyboard not opening in gcc 4.8 based builds""

This reverts commit d9a2fa0717e2b5abab4dde00e83d84a03ae3be26.