Fixes for compatibility with TeamCity 8.1.1

The plugin worked great for me,
since I am using the newest version of TeamCity (8.1.1 currently) I had to make a couple of minor modifications to make it compile, which are contained in the given commit.