Unterminated function fixes

I haven't noticed the missing semicolons causing any actual issues, but best to include them to ensure maximum cross browser compatibility.