There is nothing strange in a compiled plugin that doesn't work. If everything is written as it should for the computer to read, it doesn't mean the in-game logic is correct as well.
client_connect is called when the player is still connecting, so he can't possibly see the chat message. Try using client_putinserver and/or a 1-2 seconds task to delay the function.