Fixed usage of extern so that it works with older C standard.