Fix build errors in firmwares when compiling with newer versions of GCC.

Should resolve issue #2.