The problem was due to the fact that I downloaded an older version of the framework from Sourceforge instead of Gitthub! I have paid the price for my stupidity. Darkmode works fine in the latest version from Github.